
package com.raysweather.android;

import android.appwidget.AppWidgetManager;
import android.appwidget.AppWidgetProvider;
import android.content.Context;
import android.content.Intent;

/**
 * Simple provides a basic class for the Manifest to see as a widget provider.
 * Just tells how it should be updated.  A AppWidgetProvider is needed to have 
 * a widget.
 * 
 * @author Matthew Lingelbach
 *
 */
public class WeatherWidget extends AppWidgetProvider {


	@Override
	public void onUpdate(Context context, AppWidgetManager appWidgetManager,
			int[] appWidgetIds) {
		// To prevent any ANR timeouts, we perform the update in a service
		RaysWeather rw = RaysWeather.getInstance();
		if(rw != null)
			rw.update();
	}

}
